package com.mszlu.rpc.provider.service.impl;

import com.mszlu.rpc.annotation.MsService;
import com.mszlu.rpc.provider.service.GoodsService;
import com.mszlu.rpc.provider.service.modal.Goods;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
//@MSService
@MsService
public class GoodsServiceImpl implements GoodsService {
    @Value("${server.port}")
    private int port;

    public Goods findGoods(Long id) {

        System.out.println("productor");
//        response.setContentType("application/json;charset=UTF-8");
//        response.setCharacterEncoding("UTF-8");
//        return new Goods(id,"服务提供方商品", BigDecimal.valueOf(100));
        return new Goods(id,"service provider goods" + port, BigDecimal.valueOf(100));
    }
}
